<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>



  
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>TestPlugin</title>
  

  
  
  <script type="text/x-mathjax-config">
      MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
    </script>
  <script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
  </script>
  
  <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
    </script></head><body>
<h1 style="text-align: center;">TestPlugin</h1>

<table style="text-align: left; width: 373px; height: 246px; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2">

  <tbody>
    <tr align="center">
      <td style="vertical-align: top;"><a name="Representative_image_of_the_TestPlugin"></a>Representative
image of the
TestPlugin plugin<br>
      </td>
    </tr>
    <tr align="center">
      <td style="vertical-align: top;"><img style="width: 281px; height: 181px;" alt="representative image of the plugin" src="TestPlugin.png"></td>
    </tr>
  </tbody>
</table>

<br>

<ul>

  <li><a href="#Introduction">Introduction</a></li>
  <li><a href="#Examples">Examples</a></li>
  <li><a href="#Project_structure">Project structure</a></li>
  <li><a href="#Intellectual_property_and_rights">Intellectual property
and
rights</a></li>
  <li><a href="#HowTo">Howto</a></li>
  <ul>
    <li><a href="#Code_documentation_">doxygen code documentation</a></li>
    <li><a href="#LaTeX_formulas">\( \LaTeX \) formulas in this document</a><br>
    </li>
  </ul>
</ul>

<br>

<h2><a name="Introduction"></a>Introduction</h2>

This page explains how to customize the empty plugin. Once you have
read this page, you can replace it with the documentation of your
plugin.<br>

To customize the template, you can:<br>

<ol>

  <li>Copy the TestPlugin directory and rename it, for example,
MyPlugin</li>
  <li>Open a command line tool in the MyPlugin directory and use the
script <span style="text-decoration: underline;">utils/changeClassName.sh</span>&nbsp; in Unix and <span style="text-decoration: underline;">utils\changeClassName.bat</span>&nbsp; in Windows 
to replace <span style="text-decoration: underline;">TestPlugin</span>
with <span style="text-decoration: underline;">MyPlugin</span> in all
the file
names and their content:<br>
<p>On Unix:<br>
    <code>utils/changeClassName.bash TestPlugin MyPlugin<br>
    </code>
    </p>
<p>On Windows:<br>
    <code>utils\changeClassName.bat TestPlugin MyPlugin<br>
cd examples<br>
..\utils\changeClassName.bat TestPlugin MyPlugin<br>
cd ../doc/<br>
..\utils\changeClassName.bat TestPlugin MyPlugin&nbsp; <span style="font-weight: bold;">This can take some time !</span><br style="font-weight: bold;">
    <br>
    </code>
    </p>
  </li><li>At this point, you may want to add the plugin directory to svn.
You can also reload this page, since its content was changed by the
last command.</li>
  <li>Finally, you can generate the (almost empty) code documentation
using in the same command line tool:<br>
    <code>doxygen Doxyfile </code><br>
  </li>
  <ol>
  </ol>
  <li>To insert the plugin in the SOFA development project, you can:</li>
  <ol>
    <li>add the following line to your sofa-local.prf<br>
      <code>DEFINES += SOFA_HAVE_PLUGIN_TestPlugin</code> </li>
    <li>add the following line to Sofa.pro<br>
      <code>contains(DEFINES, SOFA_HAVE_</code><code>PLUGIN_</code><code>TestPlugin)
{
usePlugin(TestPlugin) } </code><br>
    </li>
    <li>if your plugin depends on other plugins, edit file <a href="../TestPlugin-dependencies.prf">TestPlugin-dependencies.prf</a>
.
See <a href="../../../../sofa-dependencies.prf">sofa-dependencies.prf</a>
for examples of how dependencies are defined.<br>
    </li>
  </ol>
</ol>

<h2><a name="Examples"></a>Examples</h2>

Currently there is only one example:<br>

<ul>

  <li>TestPlugin.scn&nbsp; , which does nothing, as shown in the <a href="#Representative_image_of_the_TestPlugin">figure</a>.<br>
  </li>
</ul>

<br>

<h2><a name="Project_structure"></a>Project structure</h2>

<ul>

  <li>the C++ code is in the root directory</li>
  <li>the documentation starts in <span style="text-decoration: underline;">doc/index.html</span> and it is
linked to the <a href="code/html/index.html">code documentation</a>
which <a href="#Code_documentation_">you can generate</a> using
doxygen.
The main page of the code documentation is written in file <a href="../initTestPlugin.h">initTestPlugin.h</a>.<br>
  </li>
  <li> a template of user documentation is found in <span style="text-decoration: underline;">TestPlugin.tex</span>. Is should
be filled in for every component in the plugin, then compiled with your
favourite Latex distribution. The filename should match the name of the
component. </li>
  <li>the examples are in <span style="text-decoration: underline;">examples/</span>
. The first one is<span style="text-decoration: underline;"></span> <a href="../examples/TestPlugin.scn">TestPlugin.scn</a>, and when
runSOFA
opens it, an <a href="../examples/MyPlugin.html">html page</a> pops
up, with a link to the plugin documentation.<br>
  </li>
</ul>

<br>

<h2><a name="Intellectual_property_and_rights"></a>Intellectual
property and rights</h2>

<table style="text-align: left; width: 824px; height: 392px;" border="1" cellpadding="2" cellspacing="2">

  <tbody>
    <tr>
      <td style="vertical-align: top;">Authors<br>
      </td>
      <td style="vertical-align: top;">You</td>
    </tr>
    <tr>
      <td style="vertical-align: top;">Contact<br>
      </td>
      <td style="vertical-align: top;">You@your.institute<br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">License<br>
      </td>
      <td style="vertical-align: top;">Your can distribute this plugin
under
the same license as the core of SOFA, or any other license of your
choice.<br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">Patents<br>
      </td>
      <td style="vertical-align: top;"><br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">APP registration<br>
      </td>
      <td style="vertical-align: top;"><br>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">Sponsors<br>
      </td>
      <td style="vertical-align: top;">Do not forget to thank your
sponsors, they love it !<br>
      </td>
    </tr>
  </tbody>
</table>

<br>

<br>

<h2><a name="HowTo"></a>HowTo</h2>

<h4><a name="Code_documentation_"></a>Code documentation </h4>

can be generated using <a href="http://www.stack.nl/%7Edimitri/doxygen/">doxygen</a>. In Unix
systems, simply type <span style="font-family: monospace;">doxygen
Doxyfile</span> in the doc directory.<br>

<br>

<h4><a name="LaTeX_formulas"></a>LaTeX formulas</h4>

can be directly copy-pasted from .tex to this html document thanks to the <a href="http://www.mathjax.org/">mathjax</a> config and
script included in the header. Equation numbering and cross-referencing works, as well a newcommand.<br>

<br>

<br>

<br>

<br>

</body></html>